#include <iostream>

#include <boost/ptr_container/clone_allocator.hpp>
#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_vector.hpp>

int main()
{
	boost::ptr_set<int> s;
	s.insert(new int(1));
	s.insert(new int(0));

	std::cout << "==== 1 ====" << std::endl;
	for (auto& i : s)
	{
		std::cout << "std::static_cast<void*>(&i):" << static_cast<void*>(&i) << "    "
			<< "i:" << i << "    ";
	}
	std::cout << std::endl;

	boost::ptr_vector<int> v;
	v.resize(10, new int(100));
	std::cout << "==== 2 ====" << std::endl;
	for (auto& i : v)
	{
		std::cout << "std::static_cast<void*>(&i):" << static_cast<void*>(&i) << "    "
			<< "i:" << i << "    ";
	}
	std::cout << std::endl;

	return 0;
}